package com.ruyuan.engine.drools.process;

import com.ruyuan.engine.drools.Dog;
import com.ruyuan.engine.drools.Users;
import org.kie.api.KieServices;
import org.kie.api.internal.utils.KieService;
import org.kie.api.runtime.KieContainer;
import org.kie.api.runtime.KieSession;

import java.util.Arrays;

/**
 * 规则测试
 * */
public class DroolsDemo1 {
    public static void main(String[] args) {
//        KieServices kieServices = KieServices.Factory.get();
//        KieContainer kieClasspathContainer = kieServices.getKieClasspathContainer();
//        KieSession session1 = kieClasspathContainer.newKieSession("session1");
//        Users users = new Users("bob","bigDataEngineer",21, Arrays.asList("swim,game"),new Dog("jark","哈士奇"));
//        session1.insert(users);
//        session1.fireAllRules();
//        session1.dispose();
    }
}
